From 4045a0edd191f6b287dcc1cb6be250d1bf97c234 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 19 Jun 2023 14:54:00 +0200 Subject: [PATCH] vulkan: Check for descriptor indexing extension By checking if the extension is supported and avoiding devices when it isn't, we avoid critical warnings later. --- gdk/gdkvulkancontext.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gdk/gdkvulkancontext.c b/gdk/gdkvulkancontext.c index 16b0381f21..1dbea45076 100644 --- a/gdk/gdkvulkancontext.c +++ b/gdk/gdkvulkancontext.c @@ -1126,6 +1126,10 @@ gdk_display_create_vulkan_device (GdkDisplay *display, for (i = first; i < last; i++) { uint32_t n_queue_props; + + if (!physical_device_supports_extension (devices[i], VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME)) + continue; + vkGetPhysicalDeviceQueueFamilyProperties (devices[i], &n_queue_props, NULL); VkQueueFamilyProperties *queue_props = g_newa (VkQueueFamilyProperties, n_queue_props); vkGetPhysicalDeviceQueueFamilyProperties (devices[i], &n_queue_props, queue_props); -- 2.30.2